/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase202202 - Op6
 * <p>Powered by Lisi On 2022-05-27 14:27:03
 * <p>Created by IntelliJ IDEA
 *

 * @version 1.0
 * @since 17
 */
public class Op6 {
    public static void main(String[] args) {
        //&  &&(短路) 逻辑与
        System.out.println(true && true);//true
        System.out.println(true && false);//false
        System.out.println(false && true);//false
        System.out.println(false && false);//false

        System.out.println("-----------------------------------");
        int a = 1;
        int b = 3 + ++a;
        System.out.println(a == 2 && ++b == 3); //false
        System.out.println(b);

        System.out.println(a == 2 || ++b == 3); //true
        System.out.println(b);

        System.out.println("====================================");
        //|  ||(短路) 逻辑或
        System.out.println(true||false); //true
        System.out.println(true||true);//true
        System.out.println(false||false);//false
        System.out.println(false||true);//true

        System.out.println("====================================");
        System.out.println("-----------------------------------");
        //!逻辑非 取反 ^ 异或
        System.out.println(!!!!true);//true
        System.out.println(true ^ false);//true
        System.out.println(false ^ true);//true
        System.out.println(true ^ true);//false
        System.out.println(false ^ false);//false


    }
}
